In moving image encoding using, for example, MPEG-2, MPEG-4, and MPEG-4 AVC, a method called bi-directional prediction or bi-predictive prediction is used to efficiently reduce the encoding amount.
FIG. 1 is a diagram explaining a flow of code data. In the example shown in FIG. 1, fields B0t, B0b, B1t, B1b, B3t, B3b, B4t, B4b, B6t, B6b, B7t, and B7b are B pictures. A field I2t is an I picture, and fields P2b, P5t, P5b, P8t, and P8b are P pictures. The symbol “t” indicates that a field to which the symbol is assigned is a top field, and the symbol “b” indicates that a field to which the symbol is assigned is a bottom field.
An image encoding device sequentially acquires images shown in FIG. 1(A). As shown in FIG. 1(B), the image encoding device then skips the B picture frames and encodes the I picture and then the P picture so as to encode the B pictures that require both previous and forward encoded pictures at the end.    [Patent document No. 1] Japanese Patent Application Laid-open 2001-186469